#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void fun()
{
	int year = 0;
	for (year = 1000; year <= 2000; year++)
	{
		if (0 == year % 400)
		{
			printf("%d ", year);
			continue;
		}
		if (0 == year % 4&&0!=year%100)
		{
			printf("%d ", year);
		}
	}
}
int main()
{
	fun();
	return 0;
}